@use '@scss/common' as *;

.cardGrid {
  position: relative;

  .card {
    height: 100%;
    position: relative;
  }
}

.introWrapper {
  padding-bottom: var(--wrapper-padding-top);

  @include mid-break {
    padding-bottom: 2rem;
  }
}

.richTextWrapper {
  grid-area: 1 / 1 / 1 / -1;
  align-items: flex-start;
  justify-content: center;
  display: grid;
}

.richText {
  @include mid-break {
    padding-bottom: 2rem;
  }

  @include small-break {
    h2 {
      font-size: 1.4rem;
    }
  }
}

.cards {
  position: relative;
}

.margins {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 0;
  left: calc(var(--gutter-h) * -1);
  width: calc(100% + var(--gutter-h) * 2);
  height: 100%;

  & > * {
    position: relative;
  }

  .marginLeft {
    position: relative;
    width: var(--gutter-h);
    display: block;
  }

  .marginRight {
    position: relative;
    width: var(--gutter-h);
    display: block;
  }
}

.cardsWrapper {
  position: relative;
  border-top: 1px solid var(--grid-line-light);

  &::after {
    content: '';
    width: calc(25% * var(--excess-length-large));
    height: 1px;
    background: var(--grid-line-light);
    position: absolute;
    bottom: 0;
    left: calc(100% - 25% * var(--excess-length-large));

    @include mid-break {
      width: calc(50% * var(--excess-length-mid));
      left: calc(50% * var(--excess-length-mid));
    }
  }

  @include data-theme-selector('dark') {
    border-color: var(--grid-line-dark);

    &::after {
      background: var(--grid-line-dark);
    }
  }

  @include data-theme-selector('light') {
    border-color: var(--grid-line-light);

    &::after {
      background: var(--grid-line-light);
    }
  }

  & .backgroundGrid {
    z-index: 5;
  }
}
